package com.pg.agent.engine.client.component;

import com.pg.agent.engine.client.model.agent.AIAgent;
import lombok.Data;

/**
 * 输出风格组件
 *
 * @author huhuaping
 * @date 2023/11/2 11:13
 */
@Data
public class StyleComponent extends PromptComponent {
    private String role;

    public StyleComponent(String role) {
        super();
        this.role = role;
    }

    @Override
    public String getPrompt(AIAgent agent) {
        String style = agent.getStyle();
        String agentName = agent.getName();
        return String.format("你的角色是：%s； 你的名字是：%s；说话风格：%s。\n", role, agentName, style);
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }
}
